package cn.javass.chapter2.web.controller;

import java.io.Writer;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

public class MyApiDemoController implements Controller{

	@Override
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String id = request.getParameter("id");
		Writer writer = response.getWriter();
		writer.write("ALL Users:\n");
		String string  = DATA.getAllUser();
		writer.append(string);
		writer.flush();
		return null;
	}

	
}
